package edu.zut.cs.software.estateagent.property.web.spring.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import edu.zut.cs.software.base.web.spring.controller.GenericTreeController;
import edu.zut.cs.software.estateagent.property.domain.Holder;
import edu.zut.cs.software.estateagent.property.service.HolderManager;

/*  ->房主基本信息管理
* @author wusudan
*
*/
@Controller
@CrossOrigin(origins = "*")
@RequestMapping("property/holder")
public class HolderController extends GenericTreeController<Holder, Long, HolderManager> {

	HolderManager holderManager;

	@RequestMapping(method = RequestMethod.GET, value = "/index.html")
	public String index() {
		String result = "/holder/index";
		return result;
	}

	@Autowired
	public void setHolderManager(HolderManager holderManager) {
		this.holderManager = holderManager;
		this.manager = this.holderManager;
		this.treeManager = this.holderManager;
	}
	/*
	 * @RequestMapping("/myjson")
	 * 
	 * @ResponseBody public HashMap<String, Object> pageList() {
	 * HashMap<String,Object> params = new HashMap<String, Object>();
	 * params.put("total",holderManager.getCount()); params.put("rows",
	 * holderManager.getRoot()); return params; }
	 */

}
